import request from "./request"

// const baseUrl = "http://kumanxuan1.f3322.net:8360"

// 获取首页数据
export const getHomeData = () => request.get(`/api/index/index`)

// 获取搜索内容
export const getSearchData = () => request.get(`/api/search/index`)

// 清楚历史记录
export const clearHistory = () => request.post(`/api/search/clearhistory`)

// 下拉内容
export const downList = (params) => request.get(`/api/search/helper`, { params })

// 搜索结果
export const goodsList = (params) => request.get(`/api/goods/list`, { params })

// 专题数据
export const TopicList = (params) => request.get(`/api/topic/list`, { params })

// 专题数据
export const CurrentList = (params) => request.get(`/api/catalog/current`, { params })

// 分类数据
export const CateList = (params) => request.get(`/api/goods/category`, { params })

// 商品数据
export const ShopList = (params) => request.get(`/api/goods/detail`, { params })

// 制造商数据
export const BrandList = (params) => request.get(`/api/brand/detail`, { params })

// 有关商品
export const RelatedList = (params) => request.get(`/api/goods/related`, { params });

// 加入购物车
export const AddCar = (params) => request.post(`/api/cart/add`, params);

// 购物车数量
export const ShopNum = () => request.get(`/api/cart/goodscount`);

// 购物车商品
export const ShopCart = () => request.get(`/api/cart/index`);

// 选中商品接口（含全选）
export const ShopChecked = (params) => request.post(`/api/cart/checked`, params);

// 商品步进器
export const ShopUpdate = (params) => request.post(`/api/cart/update`, params);

// 删除商品
export const ShopDel = (params) => request.post(`/api/cart/delete`, params);

// 登录
export const Login = (params) => request.post(`/api/auth/loginByWeb`, params);

// 添加地址
export const AddAddres = (params) => request.post(`/api/address/save`, params);

// 删除地址
export const DelAddres = (params) => request.post(`/api/address/delete`, params);

// 获取地址栏
export const AddressList = () => request.get(`/api/address/list`);

// 获取省市区
export const GetAddressList = (params) => request.get(`/api/region/list`, { params });

// 获取单个地址
export const GetAddressOne = (params) => request.get(`/api/address/detail`, { params });
